ARD2  1.00 for Rev B. Hardware
Airbag Reference Demonstrator using MPC5604P
freemaster_tsa.h File Reference

FreeMASTER Driver TSA feature. More...

Go to the source code of this file.

Data Structures

struct  FMSTR_TSA_ENTRY

Defines

#define FMSTR_TSA_VERSION   2U
#define FMSTR_TSA_INFO_ENTRYTYPE_MASK   0x0003U
#define FMSTR_TSA_INFO_STRUCT   0x0000U
#define FMSTR_TSA_INFO_RO_VAR   0x0001U
#define FMSTR_TSA_INFO_MEMBER   0x0002U
#define FMSTR_TSA_INFO_RW_VAR   0x0003U
#define FMSTR_TSA_INFO_VAR_FLAG   0x0001U
#define FMSTR_TSA_INFO_RWV_FLAG   0x0002U
#define FMSTR_TSATBL_STRPTR   const char*
#define FMSTR_TSATBL_STRPTR_CAST(x)   ((FMSTR_TSATBL_STRPTR)(x))
#define FMSTR_TSATBL_VOIDPTR   const void*
#define FMSTR_TSATBL_VOIDPTR_CAST(x)   ((FMSTR_TSATBL_VOIDPTR)(x))
#define FMSTR_TSA_FUNC(id)   FMSTR_TsaGetTable_##id
#define FMSTR_TSA_FUNC_PROTO(id)   const FMSTR_TSA_ENTRY* FMSTR_TSA_FUNC(id) (FMSTR_TSA_TSIZE* pTableSize)
#define FMSTR_TSA_TABLE_BEGIN(id)
#define FMSTR_TSA_INFO1(elem, flags)   FMSTR_TSATBL_VOIDPTR_CAST(((sizeof(elem))<<2)|(flags))
#define FMSTR_TSA_INFO2(size, flags)   FMSTR_TSATBL_VOIDPTR_CAST(((size)<<2)|(flags))
#define FMSTR_TSA_STRUCT(name)   { FMSTR_TSATBL_STRPTR_CAST(#name), FMSTR_TSATBL_STRPTR_CAST(NULL), FMSTR_TSATBL_VOIDPTR_CAST(NULL), FMSTR_TSA_INFO1(name, FMSTR_TSA_INFO_STRUCT) },
#define FMSTR_TSA_MEMBER(parenttype, name, type)   { FMSTR_TSATBL_STRPTR_CAST(#name), FMSTR_TSATBL_STRPTR_CAST(type), FMSTR_TSATBL_VOIDPTR_CAST(&((parenttype*)0)->name), FMSTR_TSA_INFO1(((parenttype*)0)->name, FMSTR_TSA_INFO_MEMBER) },
#define FMSTR_TSA_RO_VAR(name, type)   { FMSTR_TSATBL_STRPTR_CAST(#name), FMSTR_TSATBL_STRPTR_CAST(type), FMSTR_TSATBL_VOIDPTR_CAST(&(name)), FMSTR_TSA_INFO1(name, FMSTR_TSA_INFO_RO_VAR) },
#define FMSTR_TSA_RW_VAR(name, type)   { FMSTR_TSATBL_STRPTR_CAST(#name), FMSTR_TSATBL_STRPTR_CAST(type), FMSTR_TSATBL_VOIDPTR_CAST(&(name)), FMSTR_TSA_INFO1(name, FMSTR_TSA_INFO_RW_VAR) },
#define FMSTR_TSA_RO_MEM(name, type, addr, size)   { FMSTR_TSATBL_STRPTR_CAST(#name), FMSTR_TSATBL_STRPTR_CAST(type), FMSTR_TSATBL_VOIDPTR_CAST(addr), FMSTR_TSA_INFO2(size, FMSTR_TSA_INFO_RO_VAR) },
#define FMSTR_TSA_RW_MEM(name, type, addr, size)   { FMSTR_TSATBL_STRPTR_CAST(#name), FMSTR_TSATBL_STRPTR_CAST(type), FMSTR_TSATBL_VOIDPTR_CAST(addr), FMSTR_TSA_INFO2(size, FMSTR_TSA_INFO_RW_VAR) },
#define FMSTR_TSA_TABLE_END()
#define FMSTR_TSA_UINT8   "\xE0"
#define FMSTR_TSA_UINT16   "\xE1"
#define FMSTR_TSA_UINT32   "\xE2"
#define FMSTR_TSA_UINT64   "\xE3"
#define FMSTR_TSA_SINT8   "\xF0"
#define FMSTR_TSA_SINT16   "\xF1"
#define FMSTR_TSA_SINT32   "\xF2"
#define FMSTR_TSA_SINT64   "\xF3"
#define FMSTR_TSA_UFRAC16   "\xE5"
#define FMSTR_TSA_UFRAC32   "\xE6"
#define FMSTR_TSA_FRAC16   "\xF5"
#define FMSTR_TSA_FRAC32   "\xF6"
#define FMSTR_TSA_FLOAT   "\xFA"
#define FMSTR_TSA_DOUBLE   "\xFB"
#define FMSTR_TSA_USERTYPE(type)   #type
#define FMSTR_TSA_MEMORY   NULL
#define FMSTR_TSA_TABLE_LIST_BEGIN()   const FMSTR_TSA_ENTRY* FMSTR_TsaGetTable(FMSTR_TSA_TINDEX nTableIndex, FMSTR_TSA_TSIZE* pTableSize) {
#define FMSTR_TSA_TABLE(id)
#define FMSTR_TSA_TABLE_LIST_END()   { return NULL; } }

Typedefs

typedef FMSTR_SIZE FMSTR_TSA_TINDEX
typedef FMSTR_SIZE FMSTR_TSA_TSIZE

Functions

const FMSTR_TSA_ENTRYFMSTR_TsaGetTable (FMSTR_TSA_TINDEX nTableIndex, FMSTR_TSA_TSIZE *pTableSize)

Detailed Description

FreeMASTER Driver TSA feature.

Version:
1.0.10.0
Date:
Aug-10-2011

Define Documentation

#define FMSTR_TSA_TABLE (   id)
Value:
if(!nTableIndex--) { \
        FMSTR_TSA_FUNC_PROTO(id); \
        return FMSTR_TSA_FUNC(id)(pTableSize); \
    } else
#define FMSTR_TSA_TABLE_BEGIN (   id)
Value:
FMSTR_TSA_FUNC_PROTO(id); \
    FMSTR_TSA_FUNC_PROTO(id) { \
        static FMSTR_TSA_CDECL FMSTR_TSA_ENTRY fmstr_tsatable[] = {
#define FMSTR_TSA_TABLE_END ( )
Value:
}; \
    if(pTableSize) *pTableSize = sizeof(fmstr_tsatable); \
    return fmstr_tsatable; }